<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <style>
        #container {
            position: absolute;
            margin: auto;
        }
        
        .div1 {
            height: 100px;
            background-color: royalblue;
        }
        
        .div2 {
            width: 500px;
            height: 100px;
            background-color: blueviolet;
            position: relative;
            top: 30px;
            left: 30px;
        }
        
        .div3 {
            height: 100px;
            background-color: deeppink;
        }
        
        .div4 {
            height: 100px;
            background-color: deepskyblue;
        }
    </style>
    <div id="container">
        <div class="div1">第一个div</div>
        <div class="div2">第二个div</div>
        <div class="div3">第三个div</div>
        <div class="div4">第四个div</div>
    </div>
</body>

</html>